Computer animation has revolutionized the entertainment industry. Moviegoers are now treated to fantastic visual worlds that previously existed only in the mind's eye. Gamers can play amazingly immersive games on computers, video game consoles, handheld devices and other appliances. Training simulators are so realistic that it has become hard to distinguish the real thing from the simulation. Many years of intensive effort by computer scientists as well as advances in graphics hardware capabilities and power have brought these changes about.
The first computer graphics systems were two-dimensional systems. They represented and displayed objects in 2D. Some such interactive graphics systems used sprites (small 2D images that could be positioned at any desired location on the display) to render moving objects over a fixed background image from a fixed viewpoint. Such technology was consistent with the relatively low-performance graphics hardware available at the time.
As graphics processing capabilities and performance increased, developers began developing animations based on 3D models. Such 3D models generally used polygons to represent 3D objects in a 3D virtual world. These 3D objects could be rendered from any desired viewpoint, with graphics hardware taking care of automatically transforming the geometry of the object to accommodate different viewpoints. Such 3D graphics were much more immersive than 2D graphics at the cost of increased hardware and processing complexity.
However, even with increased graphics processing capabilities, there sometimes are advantages to conserving processing and memory resources and reducing graphics processing complexity. Because rendering human and other complex animated characters based on 3D models can be computationally and storage capacity intensive, the art has developed a technique sometimes referred to as “imposters” for use in certain circumstances where three-dimensional effects are not so important. These so-called “imposters” are two-dimensional models that the animation program can selectively substitute for three-dimensional models. The 2D models are projected into 3D space for certain well-defined purposes. Much like texture mapping (where 2-D images are used to provide a higher degree of image complexity without corresponding increase in number of polygons or vertices), the use of imposters can provide highly visually complex and interesting effects without corresponding increased polygon count and associated computational complexity. Furthermore, such 2D imposter models can be animated to provide motion and action. See e.g., Schaufler, Gernot and Wolfgang Sturzlinger, “A Three Dimensional Image Cache for Virtual Reality” Proceedings of EUROGRAPHICS (August 1996). Such 2D animation provides a high degree of image complexity and interest at relatively small polygon count (e.g., one or two polygons per object). Textures are often still images whereas imposters can be animated, and imposters are typically used to subtly replace corresponding 3D objects during animation whereas textures are often used in conjunction with 3D imaging (e.g., to supply wood grain on the 3D surfaces of a table, etc.). Texture mapping and imposter technology can be used together.
One interesting use of “imposters” is in scenes that show large crowds of people. While it is possible to use 3-D rendering techniques to render each person in the crowd, separately 3D modeling and rendering thousands of people in a crowd could be very computationally intensive and storing all those 3D models could take up lots of memory. Especially when the rendering occurs on relatively low-power computing hardware and/or where there are memory constraints, there is an advantage in substituting or using two-dimensional models in place of three-dimensional models when performing such crowd rendering.
It is also possible to dynamically switch between a 3-D model of a particular animated object and the 2-D imposter of that object on an as-needed basis. For example, when an animated object is in the foreground of a scene and is interacting with other aspects of the scene, it may be desirable to render the image of that object from a three-dimensional model. On the other hand, if the animated object then moves (or by change of viewpoint is moved) into the background of the scene so that three-dimensional depth and other 3-D aspects of the animated character can no longer be discerned and/or are no longer as important, it is possible to substitute a 2-D imposter for the 3-D construct and realize a corresponding decrease in computations required to render the image.
As one simple example, each of many faces of a large crowd in a sports stadium could be rendered using 2D imposter models. If the virtual camera is zoomed in on one or a small number of the faces in the crowd, 3D models could be dynamically substituted and the viewer would see the corresponding richness and depth provided by the 3D models. Note that in this example, computational complexity would be manageable because by zooming in on only a few faces, the system would no longer need to image hundreds of faces in the crowd. Once the virtual camera is zoomed back out to achieve a wider angle view, the 2D imposter models could again be substituted in place of the 3D models to continue to maintain computational complexity at acceptable levels.
Because imposters generally do not have depth, they have not generally been used in 3D graphics generation when collision detection is involved. Many systems do assign imposters or 2D sprites a planar depth (i.e., a single z value that applies to the entire 2D image) so that hidden surface removal can place one 2D sprite in front of another. Such capabilities along with transparency can provide what is sometimes referred to as 2½D depth effects. However, in a 3D graphics system, when collision detection is needed to check spatial interference between two 3D objects, generally speaking such collision is usually or often performed in 3D space based on the 3D models of the respective objects.
Exemplary illustrative non-limiting technology herein uses imposters is a different way to achieve seemingly 3D effects with high efficiency. Consider where plural objects such as animated characters move together and occupy the same or nearly the same 3D space such as when one character follows or carries another character, or where one character happens to follow the other in for example a multiplayer gaming context. In such situations, it may be relatively computationally intensive to use conventional 3D collision detection techniques to continually determine points of intersection between the plural objects and remove appropriate hidden surfaces, especially if the two characters are independently controlled by different users in an interactive graphics generating environment. Under such circumstances, the exemplary illustrative non-limiting implementation uses a common 2D imposter or animated sprite to image and animate the plural objects in 2D. Thus, when the plural objects are separated in space, each object can be represented using its respective 3D model. However, when the plural objects contact one another, occupy at least part of the same space, or are very close to one other (e.g., as would arise in a situation when the plural objects are moving together in tandem or substantially in tandem), the animation system switches from using plural respective 3D models to using a common 2D model for rendering the plural objects.
Such use of a common 2D model can be restricted in some implementations to situations where the user's viewpoint can be restricted to be at least approximately perpendicular to the plane of 2D model, and/or the 2D model can be oriented so its plane is perpendicular to the direction of the virtual camera.
By using a common 2D model as described above, complex collision detection and sorting can be averted and there is no need to maintain detailed depth information (e.g., as in z-texturing) distinguishing depths of different parts of the plural objects—even if in a multiplayer or other environment when there may be no way to predict the display order ahead of time. Furthermore, in some illustrative implementations, the 2D model can have a planar depth that allows the graphics system to perform collision detection and hidden surface removal with respect to other objects in the 3D virtual world (e.g., so the plural objects moving in tandem can together move behind other objects and in front of other objects). Thus, in some illustrative implementations, the graphics system can continue to perform 3D collision detection and hidden surface removal between the 2D representation and other, 3D objects. However, the graphics system is relieved of the burden of having to detect collisions between the plural objects moving in tandem and performing associated hidden surface removal and other 3D processing with respect to those plural objects. This reduces processing complexity and memory loading, freeing up resources to permit more complex 3D backgrounds or the like.
One aspect of the exemplary illustrative technology herein provides a method that in use is performed by a computer animation and graphics generation system of the type including a processor, a 3D graphics processor coupled to said processor, and a memory coupled to at least the processor, said 3D graphics processor generating image information for display. The method for animating plural 3D moving objects may comprise determining whether said plural 3D moving objects overlap; if said plural 3D moving objects overlap, substituting use of a 2D imposter model common to said overlapping plural 3D moving objects in place of respective 3D models of said plural 3D objects; processing said 2D imposter model within a 3D world; and generating an image of said plural moving objects based on said 2D imposter model for display at least in part in response to said processing.
Apparatus and storage media are also provided herein.